home *** CD-ROM | disk | FTP | other *** search
-
-
-
- FIND(V37) FIND(V37)
-
-
- FFOORRMMAATT
- FFIINNDD [ DDIIRR ] _d_i_r_e_c_t_o_r_y [ DDEEPPTTHH ] [ EEXXPPRREESSSSIIOONN ] _e_x_p_r_e_s_s_i_o_n
-
- TTEEMMPPLLAATTEE
- DDIIRR//AA,,DDEEPPTTHH//SS,,EEXXPPRREESSSSIIOONN//FF//AA
-
- PPUURRPPOOSSEE
- To find files and directories.
-
- SSPPEECCIIFFIICCAATTIIOONN
- FFIINNDD recursively descends the directory hierarchy for
- _d_i_r_e_c_t_o_r_y seeking files and directories that match the
- _e_x_p_r_e_s_s_i_o_n written using the functions given below. In the
- descriptions, the argument _n is used as a decimal integer.
- GGTT _n means greater than _n, LLTT _n means less than _n, and EEQQ
- _n, or simply _n, means exactly _n. The DDEEPPTTHH switch causes
- the descent of the directory hierarchy to be done so that
- all entries in a directory are acted on before the direc
- tory itself. The function and operator names are not case
- sensitive.
-
- The _e_x_p_r_e_s_s_i_o_n is made up of:
-
- CCOOMMMMEENNTT _p_a_t_t_e_r_n
- True if _p_a_t_t_e_r_n matches the comment attached to the
- current name.
-
- DDAAYYSS [GGTT|LLTT|EEQQ] _n
- True if the file or directory has been modified in
- _n days.
-
- EEXXEECC _c_o_m_m_m_a_n_d
- True if the executed _c_o_m_m_a_n_d returns a zero value
- as its return code. A _c_o_m_m_a_n_d line containing
- whitespace must either have the whitespace escaped,
- or be surrounded by quotes. A command argument {}
- is replaced by the current name (with its relative
- path).
-
- EEXXEECCOOKK _c_o_m_m_a_n_d
- As EEXXEECC except that the generated command line is
- printed with a question mark, and is executed only
- if the user responds by typing a yy.
-
- FFLLAAGGSS _f_l_a_g_s
- True if _f_l_a_g_s matches the protection bits of the
- current name. The _f_l_a_g_s argument is a string of
- letters representing the protection bits: rr - the
- file can be read. ww - the file can be written to.
- ee - the file is an executable program. dd - the
- file can be deleted. ss - the file is a script. pp
- - the file can be made resident. aa - the file has
- been archived. If a letter is preceded by a '--', it
- means that in order to match, the corresponding
-
-
-
- Find version 37.2 22 May 1993 1
-
-
-
-
-
- FIND(V37) FIND(V37)
-
-
- file bit must not be set. Unspecified bits are
- ignored in the comparison. Whitespace is not
- allowed in _f_l_a_g_s.
-
- LLFFOORRMMAATT _f_m_t_s_t_r_i_n_g
- Always true; prints _f_m_t_s_t_r_i_n_g replacing occurences
- of %N with the name of the object, %R with its rel
- ative path, %L with its length in bytes (this is
- only useful for file type objects), and %C with any
- attached comments. To print a % character use %%.
-
- NNAAMMEE _p_a_t_t_e_r_n
- True if _p_a_t_t_e_r_n matches the current name.
-
- PPRRIINNTT Always true; causes the current name to be printed
- (with its relative path).
-
- PPRRUUNNEE Always true. Has the side effect of pruning the
- search tree at the current name. Necessary if the
- DDEEPPTTHH switch isn't used and the directory currently
- being matched is deleted.
-
- RREEXXXX _s_t_r_i_n_g_-_f_i_l_e
- True if the ARexx _s_t_r_i_n_g_-_f_i_l_e returns with a zero
- return code. An Arexx string-file is a one line
- program given directly on the command line. The
- ARexx interface supports one command: GGEETTAATTTTRR _s_t_e_m_.
- where _s_t_e_m_. (remember the trailing dot) is the
- name of the ARexx stem variable the information
- about the current name is to be placed in. The
- resulting compound symbol will have the following
- nodes: ..NNAAMMEE - the current name without its path.
- ..RREELLNNAAMMEE - the current name with its relative path.
- ..FFUULLLLNNAAMMEE - the current name with its full path.
- ..CCOOMMMMEENNTT - the optional attached comment or an
- empty string. ..TTYYPPEE - the type: FFIILLEE, LLIINNKKFFIILLEE,
- DDIIRR, LLIINNKKDDIIRR, SSOOFFTTLLIINNKK, or UUNNKKNNOOWWNN. ..SSIIZZEE - the
- size in bytes. Only meaningful for files. ..DDAAYY -
- the name of the day of the last modification.
- ..DDAATTEE - the last modification date in the standard
- Amiga format. ..TTIIMMEE - the last modification time
- in the standard Amiga format. ..DDAAYYSS, ..MMIINNSS, and
- ..TTIICCKKSS - the time of the last modification
- expressed as the number of days since January 1,
- 1978, the number of minutes past midnight, and the
- number of 'ticks' past the minute.
-
- SSIINNCCEE _d_a_t_e
- True if the file or directory has been modified on
- or after _d_a_t_e. The format for _d_a_t_e is either
- _d_d_-_m_m_m_-_y_y or one of TTOOMMOORRRROOWW, TTOODDAAYY, YYEESSTTEERRDDAAYY,
- MMOONNDDAAYY, TTUUEESSDDAAYY, WWEEDDNNEESSDDAAYY, TTHHUURRSSDDAAYY, FFRRIIDDAAYY, SSAATT
- UURRDDAAYY, or SSUUNNDDAAYY.
-
-
-
-
- Find version 37.2 22 May 1993 2
-
-
-
-
-
- FIND(V37) FIND(V37)
-
-
- SSIIZZEE [GGTT|LLTT|EEQQ] _n
- True if the file is _n bytes long. Always false if
- the current name is not a (hard link to a) file.
-
- TTYYPPEE _t_y_p_e
- True if the type of the filesystem object is _t_y_p_e,
- where _t_y_p_e is one of FFIILLEE, LLIINNKKFFIILLEE, DDIIRR, LLIINNKKDDIIRR,
- or SSOOFFTTLLIINNKK for file, hard link to file, directory,
- hard link to directory, or soft link to a file or
- directory, respectively.
-
- UUPPTTOO _d_a_t_e
- True if the file or directory has been modified on
- or before _d_a_t_e.
-
- { _e_x_p_r_e_s_s_i_o_n }
- True if the expression inside the braces is true.
-
- The functions may be combined using the following opera
- tors:
-
- NNOOTT The negation of a function.
-
- AANNDD Concatenation of functions. The keyword AANNDD is
- optional, as it is implied by the juxtaposition of
- two functions.
-
- OORR Alternation of functions.
-
- FFIINNDD uses '*' as an escape character to remove the special
- meaning of characters, so to get an '*', you will have to
- enter '**'. The special escape sequences '*N' and '*T'
- mean the new-line and tab characters, respectively. Escap
- ing works everywhere in the _e_x_p_r_e_s_s_i_o_n, not just inside
- double quotes. You can even escape the space character:
-
- exec delete* *{*}
-
- gives exactly the same result as
-
- exec "delete {}"
-
- EEXXAAMMPPLLEESS
- To remove all files ending in '!' or '.bak':
-
- 1> FIND SYS: {NAME #?! OR NAME #?.bak} EXEC "DELETE {}"
-
- To find all files ending in '.c' on DH0: without searching
- the sub-tree starting at the directory 'foo':
-
- 1> FIND DH0: {TYPE DIR NAME foo PRUNE} OR NAME #?.c PRINT
-
-
-
-
-
-
- Find version 37.2 22 May 1993 3
-
-
-
-
-
- FIND(V37) FIND(V37)
-
-
- DDIIAAGGNNOOSSTTIICCSS
- Should really be more informative.
-
- ARexx is inaccessible: Either the ARexx interpreter
- (RREEXXXXMMAASSTT) isn't running or FFIINNDD was unable to create its
- communications port. FFIINNDD will not complain about this if
- the RREEXXXX function isn't used. Thus it is possible to use
- FFIINNDD on a system without Arexx.
-
- BBUUGGSS
- It may take several Ctrl-C's to halt FFIINNDD when EEXXEECC, EEXXEE
- CCOOKK, or RREEXXXX is used.
-
- Specifying the DDEEPPTTHH switch is an effective way of defeat
- ing the purpose of PPRRUUNNEE. That may change in the future.
- (If you can think of a good reason for making DDEEPPTTHH a
- function, as in Unix find, instead of a command line
- switch, please tell me).
-
- SSEEEE AALLSSOO
- LLIISSTT(AmigaDOS), RRXX(ARexx), SSEEAARRCCHH(AmigaDOS)
-
- The section on ARexx in the _U_s_i_n_g _T_h_e _S_y_s_t_e_m _S_o_f_t_w_a_r_e man
- ual.
-
- AAUUTTHHOORR
- Torsten Poulin (torsten@diku.dk)
-
- UUNNRREESSTTRRIICCTTIIOONNSS
- FFIINNDD is free; anyone may redistribute copies of FFIINNDD to
- anyone under the terms stated in the GNU General Public
- Licence, a copy of which accompanies each copy of FFIINNDD.
-
- Torsten Poulin encourages you to improve and extend FFIINNDD,
- and urges that you contribute your extensions to the
- world.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Find version 37.2 22 May 1993 4
-
-
-